import { request } from '../utils/request.js'

// 新增收藏
export const addStarService = (data) =>
  request({ url: '/star/addStar', method: 'POST', data })

// 根据登录用户的ID获取其收藏的甜品
export const getStarService = (userId) =>
  request({ url: `/star/findAllByUserId/${userId}` })

// 取消收藏
export const delStarService = (data) =>
  request({ url: '/star/delStar', method: 'DELETE', data })

// 根据收藏ID获取收藏数据
export const getStarListService = (dessertId) =>
  request({ url: `/star/searchStar/${dessertId}` })
